package com.example.a517;

import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;

import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;

public class ServiceTest1 extends AppCompatActivity implements View.OnClickListener {
    private Button btn_start;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        EdgeToEdge.enable(this);
        setContentView(R.layout.activity_service_test1);

        btn_start = findViewById(R.id.start);
        btn_start.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
            if (v.getId() == R.id.start){
                Log.e("TAG", "onClick: "+Thread.currentThread().getId() );
            }
        Intent intentService = new Intent(this,MyIntentService.class);
            startService(intentService);
    }
}